﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using MyBusiness;

public partial class ManageInside_detail : Page
{
    public string txt, title, time, fujian, strPublier;
    
    private void Page_Load(object sender, System.EventArgs e)
    {
        if (!this.Page.IsPostBack)
        {
        }
    }

    protected string GetTitleHtml()
    {
        WebInfoOperation wifOperation = new WebInfoOperation();
        DataTable dt = wifOperation.GetPubInfo(Request.QueryString["id"]);
        if (dt != null)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataRow dr = dt.Rows[i];
                txt = dr["content"].ToString();
                title = dr["title"].ToString();
                time = dr["fbsj"].ToString();
            }
        }

        string html = "";
        if (title.Length <= 31)
        {
            html = "<div style=\" width:838px; height:98px; \">  <div style=\" width:838px; height:30px; font-size:25px; font-weight:bold; padding-top:15px; text-align:center;\"> " + title + "</div> <div style=\" width:808px; height:28px; font-size:12px; text-align:right; padding-top:20px; padding-right:30px;\">时间：" + time + " </div> </div>";
        }
        else if (title.Length > 31)
        {
            html = "<div style=\" width:838px; height:100px; \">  <div style=\" width:838px; height:30px;font-size:25px; font-weight:bold; padding-top:15px; text-align:center;\"> " + title.Substring(0, 31) + "</div> <div style=\" width:838px; height:30px; font-size:25px; font-weight:bold; padding-top:15px; text-align:center;\"> " + title.Substring(31) + "</div></div><div style=\" width:808px; height:28px; font-size:12px; text-align:right; padding-top:20px; padding-right:30px;\">时间：" + time + " </div>";
        }

        return html;
    }
}
